package com.zjweu.hkg.DAO;

import com.zjweu.hkg.POJO.ChatHistory;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ChatHistoryDAO {
    @Insert("insert into ChatHistory(userId,userMsg,botMsg,createTime) values (#{userId},#{userMsg},#{botMsg},now())")
    int setChatHis(ChatHistory chatHistory);
    @Select("select * from ChatHistory where userId=#{uid}")
    List<ChatHistory> getChatHisByUID(int uid);
}
